import React from 'react';
import {render} from 'react-dom';
import {Provider} from 'react-redux'
import routes from '../src/routes'
import {Router,browserHistory,hashHistory} from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux'
import configStore from '../src/store/configStore'

const store = configStore();
const history = syncHistoryWithStore(browserHistory,store);


history.listen(location => {
    console.log('监听到了路劲变化',location);
});

render(
  <Provider store={store}>
    <Router routes={routes} store={store} history={history}/>
  </Provider>
  ,
  document.getElementById('root')
);


